const BaseService = require("../base");

class UploadService extends BaseService {
  async index({ imgName, imgUrl }) {
    const ctx = this.ctx;
    const img = await ctx.model.Product.ImageList.create({
      imgName,
      imgUrl,
    });
    return this.toId(img);
  }
}

module.exports = UploadService;
